\testfile{pgfplotstest.axislines.tex}
\testsection{Axislines placement}

\def\smallplotstestyoffset{%
\addplot[smooth,blue,mark=*] coordinates {
	(-1,	11)
	(-0.75,	10.5625)
	(-0.5,	10.25)
	(-0.25,	10.0625)
	(0,		10)
	(0.25,	10.0625)
	(0.5,	10.25)
	(0.75,	10.5625)
	(1,		11)
};
}

\def\smallplotstestyoffsetneg{%
\addplot[smooth,blue,mark=*] coordinates {
	(-1,	-11)
	(-0.75,	-10.5625)
	(-0.5,	-10.25)
	(-0.25,	-10.0625)
	(0,		-10)
	(0.25,	-10.0625)
	(0.5,	-10.25)
	(0.75,	-10.5625)
	(1,		-11)
};
}

\def\smallplotstestxoffset{%
\addplot[smooth,blue,mark=*] coordinates {
	(9,	1)
	(9.25,	0.5625)
	(9.5,	0.25)
	(9.75,	0.0625)
	(10,		0)
	(10.25,	-0.0625)
	(10.5,	-0.25)
	(10.75,	-0.5625)
	(11,		-1)
};
}

\def\smallplotstestxoffsetneg{%
\addplot[smooth,blue,mark=*] coordinates {
	(-9,	1)
	(-9.25,	0.5625)
	(-9.5,	0.25)
	(-9.75,	0.0625)
	(-10,		0)
	(-10.25,	-0.0625)
	(-10.5,	-0.25)
	(-10.75,	-0.5625)
	(-11,		-1)
};
}

\testsubsection{tick align=outside}
\starttikzpicture
\startaxis[
	tick align=outside,
	]
	\smallplotstest
\stopaxis
\stoptikzpicture

\testsubsection{axis y line/ axis x line}
\starttikzpicture
\startaxis[
	axis y line=center,
	axis x line=bottom
	]
	\smallplotstest
\stopaxis
\stoptikzpicture

\testsubsection{axis [xy] line/ tick align/ y discont}
\starttikzpicture
\startaxis[
	axis y discontinuity=crunch,
	axis y line=center,
	axis x line=bottom,
	tick align=center,
	ymin=9
	]
	\smallplotstestyoffset
\stopaxis
\stoptikzpicture

\starttikzpicture
\startaxis[
	enlargelimits=false,
	minor tick num=3,
	axis y line=box,
	axis x line=middle
	]
	\addplot[blue,mark=none] plot[id=sinneg,domain=-10:0,samples=40] function{sin(x)};
\stopaxis
\stoptikzpicture

\starttikzpicture
\startaxis[
	enlargelimits=false,
	minor tick num=3,
	axis y line=left,
	axis x line=middle
	]
	\addplot[blue,mark=none] plot[id=sinneg,domain=-10:0,samples=40] function{sin(x)};
\stopaxis
\stoptikzpicture

\starttikzpicture
\startaxis[
	enlargelimits=false,
	minor tick num=3,
	axis y line=right,
	axis x line=middle
	]
	\addplot[blue,mark=none] plot[id=sinneg,domain=-10:0,samples=40] function{sin(x)};
\stopaxis
\stoptikzpicture

\starttikzpicture
\startaxis[
	enlargelimits=false,
	minor tick num=3,
	axis y line=center,
	axis x line=box,
	ymin=0, ymax=25
	]
	\addplot[blue,mark=none] plot[id=sinneg,domain=-5:5,samples=40] function{x*x+1};
\stopaxis
\stoptikzpicture

\starttikzpicture
\startaxis[
	enlargelimits=false,
	minor tick num=3,
	axis y line=center,
	axis x line=top,
	ymin=0, ymax=25
	]
	\addplot[blue,mark=none] plot[id=sinneg,domain=-5:5,samples=40] function{x*x+1};
\stopaxis
\stoptikzpicture

\starttikzpicture
\startaxis[
	enlargelimits=false,
	minor tick num=3,
	axis y line=center,
	axis x line=bottom,
	ymin=0, ymax=25
	]
	\addplot[blue,mark=none] plot[id=sinneg,domain=-5:5,samples=40] function{x*x+1};
\stopaxis
\stoptikzpicture


\starttikzpicture
\startaxis[
	enlargelimits=false,
	minor tick num=3,
	axis y line=center,
	axis x line=middle
	]
	\addplot[blue,mark=none] plot[id=sinneg,domain=-5:5,samples=40] function{sin(x)};
\stopaxis
\stoptikzpicture






\testsubsection{axis [xy] line/ tick align/ x discont}
\starttikzpicture
\startaxis[
	axis y line=box,
	axis x discontinuity=parallel,
	axis x line=middle,
	tick align=outside,
	xmin=8.5
	]
	\smallplotstestxoffset
\stopaxis
\stoptikzpicture

\starttikzpicture
\startaxis[
	axis y line=box,
	axis x discontinuity=parallel,
	axis x line=middle,
	tick align=outside,
	]
	\smallplotstestxoffsetneg
\stopaxis
\stoptikzpicture

\starttikzpicture
\startaxis[
	axis y line=box,
	axis x discontinuity=crunch,
	axis x line=middle,
	tick align=outside,
	]
	\smallplotstestxoffset
\stopaxis
\stoptikzpicture


\starttikzpicture
\startaxis[
	axis y line=box,
	axis x discontinuity=crunch,
	axis x line=middle,
	tick align=outside,
	]
	\smallplotstestxoffsetneg
\stopaxis
\stoptikzpicture

\starttikzpicture
\startaxis[
	axis y line=right,
	axis x discontinuity=crunch,
	axis x line=bottom,
	tick align=outside,
	]
	\smallplotstestxoffsetneg
\stopaxis
\stoptikzpicture

\starttikzpicture
\startaxis[
	axis y line=right,
	axis y discontinuity=crunch,
	axis x line=top,
	tick align=outside,
	]
	\smallplotstestyoffsetneg
\stopaxis
\stoptikzpicture

\testsubsection{axis y discontinuity}
\starttikzpicture
\startaxis[
	axis y discontinuity=parallel,
	]
	\smallplotstest
\stopaxis
\stoptikzpicture
